<template>
	<view class="header">
		<view class="user">
			<text class="imp">小巴掌</text>
			<text>NO.{{$store.state.user.user.staffNumber}}</text>
			<view class="rdmik">{{$store.state.user.user.collegeName}}</view>
		</view>
		<view class="logout" @click="logout"></view>
	</view>
</template>

<script>
	import { removeToken } from '../util/auth.js'
	export default {
		methods:{
			logout(){
				uni.showModal({
					title:'提示',
					content:'确认退出登录',
					success: function (res) {
					    if (res.confirm) {
							removeToken();
							uni.redirectTo({
								url:'/pages/login/login'
							})
					    }
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.header{
	display: flex;
	align-items: center;
	width: 100%;
	height: 100px;
	box-sizing: border-box;
	justify-content: space-between;
	.user{
		font-size: 17.59px;
		.imp{
			font-size: 25.28px;
		}
		.rdmik{
			font-size:11px;
			font-family:PingFang SC;
			font-weight:bold;
			color:rgba(146,152,172,1);
		}
	}
	.logout{
		width: 26px;
		height: 26px;
		background-image: url('../static/img/icon_close@3x.png');
		background-repeat: no-repeat;
	}
}
</style>
